#ifndef BOARD_MODELLING_H_
#define BOARD_MODELLING_H_

#include "../skyboxes/SkyboxModelling.h"
#include <GL\glui.h>

#define BOARD_DIMENSION 10

#define MAIN_BOARD 1
#define BENCH_BOARD1 2
#define BENCH_BOARD2 3

#define BOARD_SCALE_XZ (SKYBOX_DIM / 10.0)
#define BOARD_SCALE_Y (SKYBOX_DIM / 100.0)

#define BOARD_DIM_X BOARD_SCALE_XZ
#define BOARD_DIM_Y BOARD_SCALE_Y
#define BOARD_DIM_Z BOARD_SCALE_XZ

#define BENCH_BOARD_SCALE_X (BOARD_DIM_X)
#define BENCH_BOARD_SCALE_Y (BOARD_DIM_Y / 2.0)
#define BENCH_BOARD_SCALE_Z (BOARD_DIM_Z / 2.0)

#define BENCH_BOARD_DIM_X BENCH_BOARD_SCALE_X
#define BENCH_BOARD_DIM_Y BENCH_BOARD_SCALE_Y
#define BENCH_BOARD_DIM_Z BENCH_BOARD_SCALE_Z

#define BENCH_BOARD_TRANSLATE_X 0.0
#define BENCH_BOARD_TRANSLATE_Y (- BENCH_BOARD_DIM_Y / 2.0)
#define BENCH_BOARD_TRANSLATE_Z (BOARD_DIM_Z / 2.0 + BENCH_BOARD_DIM_Z / 2.0 + OFFSET_BETWEEN_BOARDS)

#define BOARD_BORDER_DIM (BOARD_SCALE_XZ * 0.08)

#define BOARD_PIECES_DIM (BOARD_SCALE_XZ - BOARD_BORDER_DIM * 2.0)

#define DUMMY_SQUARE_SCALE_XZ (BOARD_PIECES_DIM / BOARD_DIMENSION)
#define DUMMY_SQUARE_DIM DUMMY_SQUARE_SCALE_XZ

#define OFFSET_BETWEEN_BOARDS (BENCH_BOARD_DIM_Z * 0.25)

extern char game_board[BOARD_DIMENSION][BOARD_DIMENSION];

void draw_dummy_squares_and_pieces(GLUquadric *glQ, GLenum mode);
void display_boards(GLUquadric *glQ);

typedef char** board_game_typedef;

#endif
